System and method for image denoising optimizing object curvature

ABSTRACT

A method for removing noise from an image includes receiving image data including a plurality of pixels. A graph including a plurality of nodes and a plurality of edges interconnecting the nodes is formulated. Each pixel of the image data is represented as a node of the graph and each edge of the graph is assigned a weight based on a penalty function applied to the nodes connected by the edge where the penalty function is less when a value of a given pixel of the plurality of pixels is between or equal to the values of two neighboring pixels than when the value of the given pixel is either greater than or less than the values of both of the two neighboring pixels. A total penalty of the graph is minimized. A denoised image is provided based on the total penalty-minimized graph.

CROSS-REFERENCE TO RELATED APPLICATION

The present application is based on provisional application Ser. No.61/380,497, filed Sep. 7, 2010, the entire content of which are hereinincorporated by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present disclosure relates to image denoising and, morespecifically, to a system and method for image denoising optimizingobject curvature.

2. Discussion of Related Art

Noise reduction, or denoising, is the process of removing noise from asignal such as a digital image signal. Noise may be introduced into animage signal both at the time of acquisition, for example, due to thelimitations of the image-acquiring device, or at any point thereafter.It is often desirable to remove noise from an image. For example, in thecase of medical images, such as computed tomography (CT) images andmagnetic resonance imaging (MRI), noise may interfere with thediagnostic value of the medical image. While denoising may increase thediagnostic value of medical images, it is also possible that suboptimaldenoising techniques may inadvertently remove actual image features andreduce the diagnostic value of medical images to some degree.

Image denoising also has uses beyond processing of medical images. Forexample, photographic images may also be susceptible to noise anddenoising may be used to enhance these images as well.

Accordingly, image denoising and/or filtering may be a preliminary stepin many image processing schemes. Image denoising may be used to removeartifacts associated with image acquisition and other imaging problems.

One simple approach to denoising is to replace the color of a pixel withan average of nearby pixel colors. Such an approach may be particularlyeffective where there is some reason for neighboring pixels to sharecolor values. However, such an approach may also create a blurringeffect at points of the image where intensity change is abrupt. Thisphenomena may be particularly apparent for images including geometricpatterns.

Non-local means denoising is another approach to image denoising inwhich rather than assuming that pixels share commonality with adjacentpixels, the image is instead searched for other areas that are similarin appearance to the area currently being denoised. Then, the pixelvalue for the pixel being denoised is replaced with an average pixelvalue for the most similar areas.

Many existing approaches to image denoising seek to minimize an energyfunction that generally combines a prior data fidelity term with aregularization term encoding a model of image structure. For example,total variation (TV) has been commonly used as an energy function thatmay be minimized in performing image denoising. Such approaches may bereferred to herein as TV denoising.

SUMMARY

A method for removing noise from an image includes receiving image dataincluding a plurality of pixels. A graph including a plurality of nodesand a plurality of edges interconnecting the nodes is formulated. Eachpixel of the image data is represented as a node of the graph and eachedge of the graph is assigned a weight based on a penalty functionapplied to the nodes connected by the edge. A total penalty of the graphis minimized. A denoised image is provided based on the totalpenalty-minimized graph. The penalty function is less when a value of agiven pixel of the plurality of pixels is between or equal to the valuesof two neighboring pixels than when the value of the given pixel iseither greater than or less than the values of both of the twoneighboring pixels.

The denoised image may be provided based on the total penalty-minimizedgraph by using each node of the total penalty-minimized graph as a pixelof the denoised image. The penalty function may be determined for a setof three neighboring nodes j, i, and k, and the determined penaltyfunction may be used as a weight for an edge connecting node j with nodei and as a weight for an edge connecting node i with node k. The penaltyfunction may be zero when the value of pixel i is less than or equal tothe value of pixel j and the value of pixel i is greater than or equalto the value of pixel k; or the value of pixel i is greater than orequal to the value of pixel j and the value of pixel i is less than orequal to the value of pixel k. The penalty function may be greater thanzero and the penalty function may increase as the value of pixel iincreases when the value of pixel i is greater than both the value ofpixel j and the value of pixel k. The penalty function may increase asthe value of pixel i decreases when the value of pixel i is less thanboth the value of pixel j and the value of pixel k.

The penalty function may be defined as a quantification of curvaturebetween neighboring pixels. The penalty function for a neighborhood ofthree neighboring nodes j, i, and k, may be defined as:w_(ij)|x_(i)−x_(j)|+w_(ik)|x_(i)−x_(k)|−w_(jk)|x_(j)−x_(k)|where w_(ij) is a curvature weight for nodes i and j, w_(ik) is acurvature weight for nodes i and k, w_(jk) is a curvature weight fornodes j and k, x_(i) is the value of node i, x_(j) is the value of nodej, and x_(k) is the value of node k. The curvature weight may be definedas:

$\min\left\{ {l_{eij},l_{eik}} \right\}\left( \frac{\alpha}{\min\left\{ {l_{eij},l_{eik}} \right\}} \right)^{2}$where l_(eij) and l_(eik) are the weights of the edges e_(ij) ande_(ik), respectively, the edge weights are calculated according to thepenalty function, and α is the angle between the two edges in radians.

The received image data may include medical image data in two or threedimensions. The received image data may be a magnetic resonance image.The received image data may be a computed tomography image.

A method for removing noise from an image includes receiving image dataincluding a plurality of pixels. A plurality of neighborhoods of threeneighboring pixels of the received image data is identified. Anintensity value of a center pixel of a neighborhood of three neighboringpixels is reduced if and only if the value of the center pixel isgreater than the values of both of the other pixels of the neighborhoodof three neighboring pixels. The intensity value of the center pixel ofthe neighborhood of three neighboring pixels is increased if and only ifthe value of the center pixel is less than the values of both of theother pixels of the neighborhood of three neighboring pixels. Theintensity value of the center pixel of the neighborhood of threeneighboring pixels is neither reduced nor increased when the value ofthe center pixel is between the values of the other pixels of theneighborhood of three neighboring pixels or the value of the centerpixel of the neighborhood of three neighboring pixels is equal to thevalues of one or both of the other pixels of the neighborhood of threeneighboring pixels.

The steps of increasing and reducing may be performed iteratively untilthe received image data has been sufficiently removed of noise. Thereceived image data may include medical image data in two or threedimensions. The received image data may be a magnetic resonance image.The received image data may be a computed tomography image.

A computer system includes a processor and a non-transitory, tangible,program storage medium, readable by the computer system, embodying aprogram of instructions executable by the processor to perform methodsteps for removing noise from an image. The method includes receivingimage including a plurality of pixels. A penalty is determined for eachneighborhood of three neighboring pixel within the received image, theneighborhood including a middle pixel and two neighboring pixels, thepenalty being zero when a value of the middle pixel is between or equalto the values of the neighboring pixels and the penalty being greaterthan zero when the value of the middle pixel is not between or equal tothe values of the neighboring pixels. The determined penalty isminimized over the entire received image. A denoised image is providedbased on the penalty-minimized image.

The received image may include a two or three-dimensional medical image.Minimizing the determined penalty over the entire received image mayinclude iteratively adjusting pixel values of the received image anddetermining the penalty for each neighborhood of three neighboring pixelwithin the denoised image. The received image may include a magneticresonance image or a computed tomography image.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete appreciation of the present disclosure and many of theattendant aspects thereof will be readily obtained as the same becomesbetter understood by reference to the following detailed descriptionwhen considered in connection with the accompanying drawings, wherein:

FIG. 1 is a chart illustrating a penalty function for a given pixelƒ(x_(i)) based on a relationship between its value and the value of itsneighbors x_(j) and x_(k) according to exemplary embodiments of thepresent invention;

FIG. 2 is a flow chart illustrating an approach for performing imagedenoising according to an exemplary embodiment of the present invention;and

FIG. 3 shows an example of a computer system capable of implementing themethod and apparatus according to embodiments of the present disclosure.

DETAILED DESCRIPTION OF THE DRAWINGS

In describing exemplary embodiments of the present disclosureillustrated in the drawings, specific terminology is employed for sakeof clarity. However, the present disclosure is not intended to belimited to the specific terminology so selected, and it is to beunderstood that each specific element includes all technical equivalentswhich operate in a similar manner.

Exemplary embodiments of the present invention may provide systems andmethods for image denoising in which object curvature is optimized.These approaches involve curvature regularization, where the image isoptimized for low curvature and smooth lines. In this way, abrasiveedges and jagged lines may be filtered to appear more straight therebydenoising an image while maintaining image sharpness.

As described above, in conventional noise reduction techniques, a pixelvalue may be assigned an average value of its neighbors. In moresophisticated approaches such as the TV approach, rather than simplyreassigning pixel values as an average value of neighbors, an energyfunction is created in which a difference between a pixel and itsneighbors is characterized. The greater the difference is the greaterthe energy function will be. Then, by minimizing the energy function ofthe image, the difference between neighboring pixels is reduced and theimage denoised. The energy function may also be regarded as a penaltyand minimizing the energy function may be thought of as reducing thepenalty associated with undesirable image characteristics. However, theTV approach to denoising may also lead to blurring of lines and otherareas of sharp contrast.

Exemplary embodiments of the present intention seek to provideapproaches to denoising in which sharpness of areas of high contrast ispreserved. This may be accomplished, for example, by modifying theenergy function that is minimized. In this way, exemplary embodiments ofthe present invention provide a new way for calculating penalty so thatwhen minimized, the image is denoised while remaining sharp.

According to one such technique, the penalty function may be formulatedsuch that penalty is lesser when a value of a pixel is between thevalues of two neighboring pixels and the penalty is greater when thevalue of the pixel is not between the values of two of its neighbors.For example, a low-value pixel that is situated between two high-valuepixels would produce a greater penalty than a medium-value pixel that issituated between a low-value pixel on one side and a high-value pixel onanother side. Additionally, a high-value pixel that is situated betweena high-value pixel on one side and a low-value pixel on another sidewould also produce a lesser penalty and accordingly, a line of highcontrast would not be blurred because such an interface would presentitself as a pixel that has a value between a value of a first neighborand a value of a second neighbor.

Exemplary embodiments of the present invention may perform optimizationbased on a graph representation of the image in which each pixel of theimage appears as a vertex or node of the graph and the edge weightbetween vertices is defined to reflect the energy terms. Thus,formulating the image as a graph involves calculating edge weightsaccording to an approach for calculating energy/penalty function andthen minimizing the total energy/penalty of the entire graph. Indescribing this process, particular attention will be paid to the mannerin which the energy/penalty is calculated so as to provide thecharacteristics described above in which a reduced penalty is attributedto a pixel with a value that is between the values of its adjacentpixels.

As the formulation and the optimization may be performed on a graph, thefollowing graph terminology may be used herein. The graph

={V,E} consists of a set of vertices ν∈V and a set of edges ε∈Ε⊂V×V. Anedge incident to vertices ν_(i) and ν_(j), may be denoted e_(ij). Aweighted graph is a graph in which every edge e_(ij) is assigned aweight w_(ij). As described above, the edge weights may reflect energyterms. Here, each pixel i=(x,y) may be associated with a continuousvariable x_(i) that may represent the denoised intensity value of pixeli. Each variable x_(i) may have a corresponding vertex ν_(i) in thegraph

. The graph in which each node corresponds to a pixel in the image ofinterest may be known as the primal graph.

Exemplary embodiments of the present invention may define a penalty forpairs of edges on the primal graph. For every pair of incident edges,e_(ij) and e_(ik) (where the pixel i neighbors pixel j on one side andpixel k on the other side), in an N-connected graph, the boundary ofminimum curvature may be found by minimizing the energy function:E(x _(i) ,x _(j) ,x _(k))=w _(ij) |x _(i) −x _(j) |+w _(ik) |x _(i) −x_(k) |−w _(jk) |x _(j) −x _(k)|  (1)where

$w_{ij} = {w_{ik} = {w_{jk} = \frac{w_{ijk}}{2}}}$and w_(ijk) is the curvature weight, w, expressed as:

$\begin{matrix}{w = {\min\left\{ {l_{eij},l_{eik}} \right\}\left( \frac{\alpha}{\min\left\{ {l_{eij},l_{eik}} \right\}} \right)^{2}}} & (2)\end{matrix}$where l_(eij) and l_(eik) are the lengths of the edges e_(ij) ande_(ik), respectively, and α is the angle between them in radians. Thisangle α may be, for example, π/4 although other values may be used aswell. The curvature regularization may then be used either inconjunction with a data smoothness term, weighted by the input image, orboth. For weighted curvature, for example, the weight of the clique ofthree neighboring pixels jik may be defined as:w _(ijk) =we ^((-β(ƒ) ^(i) ^(-ƒ) ^(j) ⁾ ² ⁾ e ^((-β(ƒ) ^(i) ^(-ƒ) ^(k) ⁾² ⁾  (3)where β is a free parameter, ƒ_(i), ƒ_(j), and ƒ_(k) are the imageintensity pixels i, j, and k, respectively. The free parameter β may beset as, for example, 100, although other values may be used. It shouldbe noted that even though the curvature clique may penalize the cut ofthe edge pair e_(ij) and e_(ik), the decomposition in equation (1) mayeffectively add an edge e_(jk) having negative weight. This new set ofeffective edges which have nonzero weights may be denoted herein E* andit should further be noted that E⊂E*. The variable x may be used as abinary indicator that indicates to which class a particular pixelbelongs. However, exemplary embodiments of the present invention, forexample, as described in detail below, may provide the formulation ofcurvature regularization in the context of image filtering by relaxingthe indicator variable x to a continuous variable that may represent thefiltered image.

As described above, exemplary embodiments of the present inventionprovide approaches for defining the energy function and/or penaltyfunction associated with the edge pairs such that when the totalenergy/penalty of the graph is minimized, a denoised image may beconstructed therefrom. The energy formulations discussed herein aredefined in terms of a two-dimensional image however; exemplaryembodiments of the present invention are not limited thereto and may beapplied to three-dimensional images by straightforward extension of theconcepts described herein.

Denoising may be described in terms of recovering an original image xfrom a noisy image ƒ, wherein:ƒ_(i) =x _(i) +n _(i)  (4)where ƒ represents the observed image at the pixel/node i, x_(i)represents the true image without noise at the pixel/node i and n_(i)represents the noise contribution at the given pixel/node.

The image value at each pixel/node x_(i) may either be a binary value ormay represent an intensity value of any desired depth. Accordingly, foran adjacent pair of edges (e.g. a clique of three neighboringpixels/nodes), a pixel x_(i) is not penalized (e.g. may have a lowenergy) if ƒ_(j)≦ƒ_(i)≦ƒ_(k). Here pixel i represents the middle pixeland thus there is no penalty where the value of a noisy image pixel isbetween or equal to the values of its left and right (or top and bottom)neighbor. Otherwise, the penalty may be based on the intensity change.

FIG. 1 is a chart illustrating a penalty function for a given pixelƒ(x_(i)) based on a relationship between its value and the value of itsneighbors x_(j) and x_(k). As can be seen by this figure, a penalty ofzero is provided when the value of the middle pixel xi is between orequal to the values of the flanking neighbors and a penalty increases asthe value of the middle pixel is increasingly beyond the values of theflanking neighbors.

As discussed above, the value of each image pixel x_(i) may either bebinary or a continuous value. When the value is relaxed to becontinuous, the energy function, an example of which is depicted in FIG.1, may become convex and may be efficiently optimized using, forexample, descent methods. Formally, given an initial value for x=ƒ, thedenoised image may be obtained iteratively as x=argmin E(x) where thedenoised energy E(x) is expresses as follows:E(x)=λE _(data) +E _(regularization) =λ∥x−ƒ∥ ₂ ²+1^(T) G|Ax|  (5)with gradient:

$\begin{matrix}{\begin{matrix}{\partial E} \\\underset{\_}{\partial x}\end{matrix} = {{2\lambda{{x - f}}} + {A^{T}G\mspace{14mu}{{sgn}({Ax})}}}} & (6)\end{matrix}$where A is the edge node incidence matrix of the graph

(with the effective edge set E*) representing the image ƒ. Here, theedge node incidence matrix A may be defined as:

$\begin{matrix}{{A\left( {e_{i,j},v_{k}} \right)} = \left\{ \begin{matrix}{+ 1} & {{{if}\mspace{14mu} i} = k} \\{- 1} & {{{if}\mspace{14mu} j} = k} \\0 & {otherwise}\end{matrix} \right.} & (7)\end{matrix}$

Here G is the constitutive matrix, which may be a diagonal matrix withthe square weight of each edge along the diagonal and λ is a tuningparameter that determines the strength of the regularization withrespect to the data term. The term λ may be set as, for example, 20,although other values may be used.

The following iterative updates may be used to perform gradient descenton the observed noisy image ƒ according the energy E:

$\begin{matrix}{x^{k + 1} = {x^{k} - {\Delta\; t\frac{\partial E}{\partial x}}}} & (8)\end{matrix}$where Δt is the time step for the update. The time step Δt may be, forexample, 0.001, although other values may be used. Accordingly,exemplary embodiments of the present invention may utilize equations(5), (6) and (8) to perform the image denoising with curvatureregularization. Additionally, to reduce blocking artifacts, a diffusionterm may be added to get a modified energy E defined as:E(x)=λE _(data) +E _(regularization) +μE _(diffusion) =λ∥x−ƒ∥ ₂ ²+1^(T)G|Ax|+μx ^(T) Lx  (9)with gradient:

$\begin{matrix}{\frac{\partial E}{\partial x} = {{2\lambda{{x - f}}} + {A^{T}G\;{{sgn}({Ax})}} + {2\mu\;{Lx}}}} & (10)\end{matrix}$where L is the weighted Laplacian matrix for which the edge weights aredefined as w_(ij)=exp(−γ(ƒ_(i)−ƒ_(j))²), and μ is a weightingcoefficient that controls strength of the diffusion. The weightedcoefficient μ may be set as, for example, 2, although other values maybe used. Therefore, equation (10) may be used to perform the update inequation (8) and the weighted Laplacian matrix may be recalculated everyn iterations, for example, n=10 and thus the Laplacian matrix may berecalculated every 10 iterations, although other values for n may beused.

FIG. 2 is a flow chart illustrating an approach for performing imagedenoising according to an exemplary embodiment of the present invention.First, a noisy image ƒ may be acquired (Step S21). The image ƒ may betwo-dimensional or three-dimensional medical image data such as an MRIor a CT scan. The noise present in the image ƒ may be attributable tothe image acquisition or any other source. The image ƒ may be acquiredeither directly from a scanning device or may be loaded from a storagedevice. A graph

may then be constructed from the acquired noisy image ƒ (Step S22). Thegraph

may be defined as

={V,E*} where V represents the set of vertices and E* represents the setof edges having non-zero weights. Each vertex ν_(i) may correspond to apixel i in the image ƒ. Each edge e_(ij) may correspond to the edgeconnecting the pixel i with a first neighboring pixel j and each edgee_(ik) may correspond to the edge connecting the pixel i with a secondneighboring pixel k.

The edge weights may be calculated as a penalty in which the penalty isrelatively small or zero where a value of a middle pixel is between orequal to each of the values of both neighboring pixels and the penaltyis relatively large or non-zero where the value of the middle pixel isnot between or equal to each of the values of both neighboring pixels(Step S23). Moreover, the penalty may be increasingly large as the valueof the middle pixel is increasingly beyond the range between the twoneighboring pixels. For example, the edge weight may be calculated inaccordance with equation (3) above. It should be noted that the cliqueof three pixels may form a row or a column of the image and both theneighboring pixels j and k may be on opposite sides of the middle pixeli with respect to a common axis. Additionally, an edge node incidencematrix A may be calculated from the defined graph

, for example, in accordance with equation (7) above, a constitutivematrix G may be calculated, for example, in accordance with thedescription above, and a weighted Laplacian matrix L may be calculatedin accordance with the description above.

The set of edge weights may then be minimized to produce a denoisedimage (Step S24). Minimization of the edge weights may be performediteratively, for example, the gradient of the energy/penalty functionmay be calculated using equation (10) and equation (8) with initial theconditions x⁰=ƒ. Iteration may be performed by recalculating theweighted Laplacian matrix L if k mod n=0 until ∥x_(k)−x_(k-1)∥₂ ²<ε.After the edge weights have been minimized, the denoised image may bedisplayed and or saved to a storage device (Step S25).

FIG. 3 shows an example of a computer system which may implement amethod and system of the present disclosure. The system and method ofthe present disclosure may be implemented in the form of a softwareapplication running on a computer system, for example, a mainframe,personal computer (PC), handheld computer, server, etc. The softwareapplication may be stored on a recording media locally accessible by thecomputer system and accessible via a hard wired or wireless connectionto a network, for example, a local area network, or the Internet.

The computer system referred to generally as system 1000 may include,for example, a central processing unit (CPU) 1001, random access memory(RAM) 1004, a printer interface 1010, a display unit 1011, a local areanetwork (LAN) data transmission controller 1005, a LAN interface 1006, anetwork controller 1003, an internal bus 1002, and one or more inputdevices 1009, for example, a keyboard, mouse etc. As shown, the system1000 may be connected to a data storage device, for example, a harddisk, 1008 via a link 1007.

Exemplary embodiments described herein are illustrative, and manyvariations can be introduced without departing from the spirit of thedisclosure or from the scope of the appended claims. For example,elements and/or features of different exemplary embodiments may becombined with each other and/or substituted for each other within thescope of this disclosure and appended claims.

What is claimed is:
 1. A method for removing noise from an image,comprising: receiving image data including a plurality of pixels;formulating a graph including a plurality of nodes and a plurality ofedges interconnecting the nodes, wherein each pixel of the image data isrepresented as a node of the graph and each edge of the graph isassigned a weight based on a penalty function applied to the nodesconnected by the edge; minimizing a total penalty of the graph; andproviding a denoised image based on the total penalty-minimized graph,wherein the penalty function is less when a value of a given pixel ofthe plurality of pixels is between or equal to the values of twoneighboring pixels than when the value of the given pixel is eithergreater than or less than the values of both of the two neighboringpixels.
 2. The method of claim 1, wherein the denoised image is providedbased on the total penalty-minimized graph by using each node of thetotal penalty-minimized graph as a pixel of the denoised image.
 3. Themethod of claim 1, wherein the penalty function is determined for a setof three neighboring nodes j, i, and k, and the determined penaltyfunction is used as a weight for an edge connecting node j with node iand as a weight for an edge connecting node i with node k.
 4. The methodof claim 3, wherein the penalty function is zero when: the value ofpixel i is less than or equal to the value of pixel j and the value ofpixel i is greater than or equal to the value of pixel k; or the valueof pixel i is greater than or equal to the value of pixel j and thevalue of pixel i is less than or equal to the value of pixel k.
 5. Themethod of claim 3, wherein the penalty function is greater than zeroand: the penalty function increases as the value of pixel i increaseswhen the value of pixel i is greater than both the value of pixel j andthe value of pixel k; and the penalty function increases as the value ofpixel i decreases when the value of pixel i is less than both the valueof pixel j and the value of pixel k.
 6. The method of claim 1, whereinthe penalty function is defined as a quantification of curvature betweenneighboring pixels.
 7. The method of claim 1, wherein the penaltyfunction for a neighborhood of three neighboring nodes j, i, and k, isdefined as:w_(ij)|x_(i)−x_(j)|+w_(ik)|x_(i)−x_(k)|−w_(jk)|x_(j)−x_(k)| whereinw_(ij) is a curvature weight for nodes i and j, w_(ik) is a curvatureweight for nodes i and k, w_(jk) is a curvature weight for nodes j andk, x_(i) is the value of node i, x_(j) is the value of node j, and x_(k)is the value of node k.
 8. The method of claim 7, wherein the curvatureweight is defined as:$\min\left\{ {l_{eij},l_{eik}} \right\}\left( \frac{\alpha}{\min\left\{ {l_{eij},l_{eik}} \right\}} \right)^{2}$wherein l_(eij) and l_(eik) are the weights of the edges e_(ij) ande_(ik), respectively, the edge weights are calculated according to thepenalty function, and α is the angle between the two edges in radians.9. The method of claim 1, wherein the received image data comprisesmedical image data in two or three dimensions.
 10. The method of claim1, wherein the received image data is a magnetic resonance image. 11.The method of claim 1, wherein the received image data is a computedtomography image.
 12. A computer system comprising: a processor; and anon-transitory, tangible, program storage medium, readable by thecomputer system, embodying a program of instructions executable by theprocessor to perform method steps for removing noise from an image, themethod comprising: receiving image including a plurality of pixels;determining a penalty for each neighborhood of three neighboring pixelwithin the received image, the neighborhood including a middle pixel andtwo neighboring pixels, the penalty being zero when a value of themiddle pixel is between or equal to the values of the neighboring pixelsand the penalty being greater than zero when the value of the middlepixel is not between or equal to the values of the neighboring pixels;minimizing the determined penalty over the entire received image; andproviding a denoised image based on the penalty-minimized image.
 13. Thecomputer system of claim 12, wherein the received image comprises a twoor three-dimensional medical image.
 14. The computer system of claim 12,wherein minimizing the determined penalty over the entire received imagecomprises iteratively adjusting pixel values of the received image anddetermining the penalty for each neighborhood of three neighboring pixelwithin the denoised image.
 15. The computer system of claim 12, whereinthe received image comprises a magnetic resonance image or a computedtomography image.